import request from '@/utils/request'
// 1.查询企业部门列表
export const getDepartment = () => {
  return request({
    url: '/company/department'
  })
}
// 2.新增部门
export const addDepartment = (data) => {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 3.编辑部门--根据ID查询部门详情
export function getDepartDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}
// 4.修改部门的提交按钮
export function updateDepartDetail(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}

// 5.根据id删除部门数据
export function delDepartDetail(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
